import Vue from 'vue'
import Cookies from 'js-cookie'
import ElementUI from 'element-ui'
import i18n from '@/framework/lang' // internationalization
import CustomComponents from '@/components/index'
import arrayStrInterchange from '@/utils/arrayStrInterchange'
import VueVideoPlayer from 'vue-video-player'
import '@/assets/css/global.css'// 商城版心样式公共类
import '@/assets/css/fonts.css'// 自定义字体

const hls = require('videojs-contrib-hls')

// 多语言版本
Vue.use(ElementUI, {
  size: Cookies.get('size') || 'medium', // set element-ui default size
  i18n: (key, value) => i18n.t(key, value)
})

Vue.use(CustomComponents)
Vue.use(VueVideoPlayer)
Vue.use(hls)

import '@/framework/utils/customMain.js' // 自定义main引入文件
import '@/utils/customMain.js' // 自定义main引入文件

import App from './App'
import store from './store'
import router from './router'

Vue.config.productionTip = false
Vue.prototype.$arrayStrInterchange = arrayStrInterchange

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: h => h(App),
  beforeCreate(){
    Vue.prototype.$bus = this
  }
})
